home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / tbbytfix.arc / TB_ULEFT.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1985-12-16  |  2.0 KB  |  56 lines

  1.   Turbo_Version: INTEGER = 3;  {For use with Upper_Left_X and Upper_Left_Y.
  2.                                 Legal values are
  3.                                      2    for Turbo, Version 2.00B
  4.                                      287  for Turbo-87, Version 2.00B
  5.                                      3    for Version 3.01A
  6.                                  L.P.}
  7.  
  8. {****************************************************************************}
  9. (*
  10. Function Upper_Left_X : Integer;       {* These four routines allow a       *}
  11. {1*}                                   {* routine to adjust its output      *}
  12. Begin                                  {* according to what size window it  *}
  13.   Upper_Left_X := Mem[Dseg:$156] + 1;  {* is operating in.  They are        *}
  14. End;                                   {* compatible only with Turbo Pascal *}
  15.                                        {* version 2.0 on an IBM PC or       *}
  16. Function Upper_Left_Y : Integer;       {* compatible                        *}
  17. {2*}
  18. Begin
  19.   Upper_Left_Y := Mem[Dseg:$157] + 1;
  20. End;
  21. *)
  22.  
  23. {These modifications allow Upper_Left_X and Upper_Left_Y to work with Turbo
  24.  Pascal, Version 2.00B, Turbo-87, Version 2.00B and all three Turbo Pascals
  25.  Version 3.01A.  They require the new typed constant Turbo_Version with the
  26.  values
  27.       2   for Turbo, Version 2.00B
  28.       287 for Turbo-87, Version 2.00B
  29.       3   for Version 3.01A
  30.  If its value is different, the functions return a value of 0.
  31.  Lew Paper
  32.  12/16/85}
  33.  
  34. Function Upper_Left_X : Integer;
  35. {1*}
  36. Begin
  37.   Case Turbo_Version of
  38.   2:   Upper_Left_X := Mem[Dseg:$156] + 1;
  39.   287: Upper_Left_X := Mem[Dseg:$143] + 1;
  40.   3  : Upper_Left_X := Mem[Dseg:$4] + 1;
  41.   ELSE Upper_Left_X := 0;
  42.   End; {Case}
  43. End;
  44.  
  45. Function Upper_Left_Y : Integer;
  46. {2*}
  47. Begin
  48.   Case Turbo_Version of
  49.   2:   Upper_Left_Y := Mem[Dseg:$157] + 1;
  50.   287: Upper_Left_Y := Mem[Dseg:$144] + 1;
  51.   3  : Upper_Left_Y := Mem[Dseg:$5] + 1;
  52.   ELSE Upper_Left_Y := 0;
  53.   End; {Case}
  54. End;
  55.  
  56.